package com.lipeng.bean;

import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

public class Photo {
    private Integer pid;

    private String pname;

    private String pic;

    private Integer uid;

    private String ptime;

    private User user;

    private MultipartFile file;

    private List<Comment> commentList;

    public Photo(){
    }

    @Override
    public String toString() {
        return "Photo{" +
                "pid=" + pid +
                ", pname='" + pname + '\'' +
                ", pic='" + pic + '\'' +
                ", uid=" + uid +
                ", ptime='" + ptime + '\'' +
                ", user=" + user +
                ", file=" + file +
                ", commentList=" + commentList +
                '}';
    }

    public Photo(Integer pid, String pname, String pic, Integer uid, String ptime, User user, MultipartFile file, List<Comment> commentList) {
        this.pid = pid;
        this.pname = pname;
        this.pic = pic;
        this.uid = uid;
        this.ptime = ptime;
        this.user = user;
        this.file = file;
        this.commentList = commentList;
    }

    public List<Comment> getCommentList() {
        return commentList;
    }

    public void setCommentList(List<Comment> commentList) {
        this.commentList = commentList;
    }


    public MultipartFile getFile() {
        return file;
    }

    public void setFile(MultipartFile file) {
        this.file = file;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname == null ? null : pname.trim();
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic == null ? null : pic.trim();
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getPtime() {
        return ptime;
    }

    public void setPtime(String ptime) {
        this.ptime = ptime;
    }
}